package com.example.module_main.ui.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter



class FragmentAdepter( fragmentActivity: FragmentActivity?, list: List<Fragment>) :
    FragmentStateAdapter(fragmentActivity!!) {
    private val list: List<Fragment> = list

    override fun createFragment(position: Int): Fragment {
        return list[position]
    }

    override fun getItemCount(): Int {
        return list.size
    }
}